/*
 * Flowable CMMN REST API
 * # flowable / flowəb(ə)l /    - a compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.  - a lightning fast, tried and tested BPMN 2 process engine written in Java. It is Apache 2.0 licensed open source, with a committed community.  - can run embedded in a Java application, or as a service on a server, a cluster, and in the cloud. It integrates perfectly with Spring. With a rich Java and REST API, it is the ideal engine for orchestrating human or system activities.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.ibm.risk.irmp.workflow.client.flowable.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Criterion
 */

public class Criterion {
  @JsonProperty("id")
  private String id = null;

  @JsonProperty("xmlRowNumber")
  private Integer xmlRowNumber = null;

  @JsonProperty("xmlColumnNumber")
  private Integer xmlColumnNumber = null;

  @JsonProperty("extensionElements")
  private Map<String, List<ExtensionElement>> extensionElements = null;

  @JsonProperty("attributes")
  private Map<String, List<ExtensionAttribute>> attributes = null;

  @JsonProperty("documentationTextFormat")
  private String documentationTextFormat = null;

  @JsonProperty("documentation")
  private String documentation = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("parent")
  private PlanFragment parent = null;

  @JsonProperty("technicalId")
  private String technicalId = null;

  @JsonProperty("sentryRef")
  private String sentryRef = null;

  @JsonProperty("sentry")
  private Sentry sentry = null;

  @JsonProperty("attachedToRefId")
  private String attachedToRefId = null;

  @JsonProperty("exitType")
  private String exitType = null;

  @JsonProperty("exitEventType")
  private String exitEventType = null;

  @JsonProperty("incomingAssociations")
  private List<Association> incomingAssociations = null;

  @JsonProperty("outgoingAssociations")
  private List<Association> outgoingAssociations = null;

  @JsonProperty("entryCriterion")
  private Boolean entryCriterion = null;

  @JsonProperty("exitCriterion")
  private Boolean exitCriterion = null;

  @JsonProperty("parentStage")
  private Stage parentStage = null;

  public Criterion id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @ApiModelProperty(value = "")
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public Criterion xmlRowNumber(Integer xmlRowNumber) {
    this.xmlRowNumber = xmlRowNumber;
    return this;
  }

   /**
   * Get xmlRowNumber
   * @return xmlRowNumber
  **/
  @ApiModelProperty(value = "")
  public Integer getXmlRowNumber() {
    return xmlRowNumber;
  }

  public void setXmlRowNumber(Integer xmlRowNumber) {
    this.xmlRowNumber = xmlRowNumber;
  }

  public Criterion xmlColumnNumber(Integer xmlColumnNumber) {
    this.xmlColumnNumber = xmlColumnNumber;
    return this;
  }

   /**
   * Get xmlColumnNumber
   * @return xmlColumnNumber
  **/
  @ApiModelProperty(value = "")
  public Integer getXmlColumnNumber() {
    return xmlColumnNumber;
  }

  public void setXmlColumnNumber(Integer xmlColumnNumber) {
    this.xmlColumnNumber = xmlColumnNumber;
  }

  public Criterion extensionElements(Map<String, List<ExtensionElement>> extensionElements) {
    this.extensionElements = extensionElements;
    return this;
  }

  public Criterion putExtensionElementsItem(String key, List<ExtensionElement> extensionElementsItem) {
    if (this.extensionElements == null) {
      this.extensionElements = new HashMap<String, List<ExtensionElement>>();
    }
    this.extensionElements.put(key, extensionElementsItem);
    return this;
  }

   /**
   * Get extensionElements
   * @return extensionElements
  **/
  @ApiModelProperty(value = "")
  public Map<String, List<ExtensionElement>> getExtensionElements() {
    return extensionElements;
  }

  public void setExtensionElements(Map<String, List<ExtensionElement>> extensionElements) {
    this.extensionElements = extensionElements;
  }

  public Criterion attributes(Map<String, List<ExtensionAttribute>> attributes) {
    this.attributes = attributes;
    return this;
  }

  public Criterion putAttributesItem(String key, List<ExtensionAttribute> attributesItem) {
    if (this.attributes == null) {
      this.attributes = new HashMap<String, List<ExtensionAttribute>>();
    }
    this.attributes.put(key, attributesItem);
    return this;
  }

   /**
   * Get attributes
   * @return attributes
  **/
  @ApiModelProperty(value = "")
  public Map<String, List<ExtensionAttribute>> getAttributes() {
    return attributes;
  }

  public void setAttributes(Map<String, List<ExtensionAttribute>> attributes) {
    this.attributes = attributes;
  }

  public Criterion documentationTextFormat(String documentationTextFormat) {
    this.documentationTextFormat = documentationTextFormat;
    return this;
  }

   /**
   * Get documentationTextFormat
   * @return documentationTextFormat
  **/
  @ApiModelProperty(value = "")
  public String getDocumentationTextFormat() {
    return documentationTextFormat;
  }

  public void setDocumentationTextFormat(String documentationTextFormat) {
    this.documentationTextFormat = documentationTextFormat;
  }

  public Criterion documentation(String documentation) {
    this.documentation = documentation;
    return this;
  }

   /**
   * Get documentation
   * @return documentation
  **/
  @ApiModelProperty(value = "")
  public String getDocumentation() {
    return documentation;
  }

  public void setDocumentation(String documentation) {
    this.documentation = documentation;
  }

  public Criterion name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(value = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Criterion parent(PlanFragment parent) {
    this.parent = parent;
    return this;
  }

   /**
   * Get parent
   * @return parent
  **/
  @ApiModelProperty(value = "")
  public PlanFragment getParent() {
    return parent;
  }

  public void setParent(PlanFragment parent) {
    this.parent = parent;
  }

  public Criterion technicalId(String technicalId) {
    this.technicalId = technicalId;
    return this;
  }

   /**
   * Get technicalId
   * @return technicalId
  **/
  @ApiModelProperty(value = "")
  public String getTechnicalId() {
    return technicalId;
  }

  public void setTechnicalId(String technicalId) {
    this.technicalId = technicalId;
  }

  public Criterion sentryRef(String sentryRef) {
    this.sentryRef = sentryRef;
    return this;
  }

   /**
   * Get sentryRef
   * @return sentryRef
  **/
  @ApiModelProperty(value = "")
  public String getSentryRef() {
    return sentryRef;
  }

  public void setSentryRef(String sentryRef) {
    this.sentryRef = sentryRef;
  }

  public Criterion sentry(Sentry sentry) {
    this.sentry = sentry;
    return this;
  }

   /**
   * Get sentry
   * @return sentry
  **/
  @ApiModelProperty(value = "")
  public Sentry getSentry() {
    return sentry;
  }

  public void setSentry(Sentry sentry) {
    this.sentry = sentry;
  }

  public Criterion attachedToRefId(String attachedToRefId) {
    this.attachedToRefId = attachedToRefId;
    return this;
  }

   /**
   * Get attachedToRefId
   * @return attachedToRefId
  **/
  @ApiModelProperty(value = "")
  public String getAttachedToRefId() {
    return attachedToRefId;
  }

  public void setAttachedToRefId(String attachedToRefId) {
    this.attachedToRefId = attachedToRefId;
  }

  public Criterion exitType(String exitType) {
    this.exitType = exitType;
    return this;
  }

   /**
   * Get exitType
   * @return exitType
  **/
  @ApiModelProperty(value = "")
  public String getExitType() {
    return exitType;
  }

  public void setExitType(String exitType) {
    this.exitType = exitType;
  }

  public Criterion exitEventType(String exitEventType) {
    this.exitEventType = exitEventType;
    return this;
  }

   /**
   * Get exitEventType
   * @return exitEventType
  **/
  @ApiModelProperty(value = "")
  public String getExitEventType() {
    return exitEventType;
  }

  public void setExitEventType(String exitEventType) {
    this.exitEventType = exitEventType;
  }

  public Criterion incomingAssociations(List<Association> incomingAssociations) {
    this.incomingAssociations = incomingAssociations;
    return this;
  }

  public Criterion addIncomingAssociationsItem(Association incomingAssociationsItem) {
    if (this.incomingAssociations == null) {
      this.incomingAssociations = new ArrayList<Association>();
    }
    this.incomingAssociations.add(incomingAssociationsItem);
    return this;
  }

   /**
   * Get incomingAssociations
   * @return incomingAssociations
  **/
  @ApiModelProperty(value = "")
  public List<Association> getIncomingAssociations() {
    return incomingAssociations;
  }

  public void setIncomingAssociations(List<Association> incomingAssociations) {
    this.incomingAssociations = incomingAssociations;
  }

  public Criterion outgoingAssociations(List<Association> outgoingAssociations) {
    this.outgoingAssociations = outgoingAssociations;
    return this;
  }

  public Criterion addOutgoingAssociationsItem(Association outgoingAssociationsItem) {
    if (this.outgoingAssociations == null) {
      this.outgoingAssociations = new ArrayList<Association>();
    }
    this.outgoingAssociations.add(outgoingAssociationsItem);
    return this;
  }

   /**
   * Get outgoingAssociations
   * @return outgoingAssociations
  **/
  @ApiModelProperty(value = "")
  public List<Association> getOutgoingAssociations() {
    return outgoingAssociations;
  }

  public void setOutgoingAssociations(List<Association> outgoingAssociations) {
    this.outgoingAssociations = outgoingAssociations;
  }

  public Criterion entryCriterion(Boolean entryCriterion) {
    this.entryCriterion = entryCriterion;
    return this;
  }

   /**
   * Get entryCriterion
   * @return entryCriterion
  **/
  @ApiModelProperty(value = "")
  public Boolean getEntryCriterion() {
    return entryCriterion;
  }

  public void setEntryCriterion(Boolean entryCriterion) {
    this.entryCriterion = entryCriterion;
  }

  public Criterion exitCriterion(Boolean exitCriterion) {
    this.exitCriterion = exitCriterion;
    return this;
  }

   /**
   * Get exitCriterion
   * @return exitCriterion
  **/
  @ApiModelProperty(value = "")
  public Boolean getExitCriterion() {
    return exitCriterion;
  }

  public void setExitCriterion(Boolean exitCriterion) {
    this.exitCriterion = exitCriterion;
  }

  public Criterion parentStage(Stage parentStage) {
    this.parentStage = parentStage;
    return this;
  }

   /**
   * Get parentStage
   * @return parentStage
  **/
  @ApiModelProperty(value = "")
  public Stage getParentStage() {
    return parentStage;
  }

  public void setParentStage(Stage parentStage) {
    this.parentStage = parentStage;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Criterion criterion = (Criterion) o;
    return Objects.equals(this.id, criterion.id) &&
        Objects.equals(this.xmlRowNumber, criterion.xmlRowNumber) &&
        Objects.equals(this.xmlColumnNumber, criterion.xmlColumnNumber) &&
        Objects.equals(this.extensionElements, criterion.extensionElements) &&
        Objects.equals(this.attributes, criterion.attributes) &&
        Objects.equals(this.documentationTextFormat, criterion.documentationTextFormat) &&
        Objects.equals(this.documentation, criterion.documentation) &&
        Objects.equals(this.name, criterion.name) &&
        Objects.equals(this.parent, criterion.parent) &&
        Objects.equals(this.technicalId, criterion.technicalId) &&
        Objects.equals(this.sentryRef, criterion.sentryRef) &&
        Objects.equals(this.sentry, criterion.sentry) &&
        Objects.equals(this.attachedToRefId, criterion.attachedToRefId) &&
        Objects.equals(this.exitType, criterion.exitType) &&
        Objects.equals(this.exitEventType, criterion.exitEventType) &&
        Objects.equals(this.incomingAssociations, criterion.incomingAssociations) &&
        Objects.equals(this.outgoingAssociations, criterion.outgoingAssociations) &&
        Objects.equals(this.entryCriterion, criterion.entryCriterion) &&
        Objects.equals(this.exitCriterion, criterion.exitCriterion) &&
        Objects.equals(this.parentStage, criterion.parentStage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, xmlRowNumber, xmlColumnNumber, extensionElements, attributes, documentationTextFormat, documentation, name, parent, technicalId, sentryRef, sentry, attachedToRefId, exitType, exitEventType, incomingAssociations, outgoingAssociations, entryCriterion, exitCriterion, parentStage);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Criterion {\n");

    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    xmlRowNumber: ").append(toIndentedString(xmlRowNumber)).append("\n");
    sb.append("    xmlColumnNumber: ").append(toIndentedString(xmlColumnNumber)).append("\n");
    sb.append("    extensionElements: ").append(toIndentedString(extensionElements)).append("\n");
    sb.append("    attributes: ").append(toIndentedString(attributes)).append("\n");
    sb.append("    documentationTextFormat: ").append(toIndentedString(documentationTextFormat)).append("\n");
    sb.append("    documentation: ").append(toIndentedString(documentation)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    parent: ").append(toIndentedString(parent)).append("\n");
    sb.append("    technicalId: ").append(toIndentedString(technicalId)).append("\n");
    sb.append("    sentryRef: ").append(toIndentedString(sentryRef)).append("\n");
    sb.append("    sentry: ").append(toIndentedString(sentry)).append("\n");
    sb.append("    attachedToRefId: ").append(toIndentedString(attachedToRefId)).append("\n");
    sb.append("    exitType: ").append(toIndentedString(exitType)).append("\n");
    sb.append("    exitEventType: ").append(toIndentedString(exitEventType)).append("\n");
    sb.append("    incomingAssociations: ").append(toIndentedString(incomingAssociations)).append("\n");
    sb.append("    outgoingAssociations: ").append(toIndentedString(outgoingAssociations)).append("\n");
    sb.append("    entryCriterion: ").append(toIndentedString(entryCriterion)).append("\n");
    sb.append("    exitCriterion: ").append(toIndentedString(exitCriterion)).append("\n");
    sb.append("    parentStage: ").append(toIndentedString(parentStage)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
